package com.sgcc.pms.getway.handler;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.server.WebFilterExchange;
import org.springframework.security.web.server.authentication.logout.ServerLogoutSuccessHandler;
import org.springframework.stereotype.Component;

import com.sgcc.pms.getway.utils.WriteResponse;
import com.sgcc.pms.tocs.common.result.WrapperedResult;

import reactor.core.publisher.Mono;

@Component
public class JsonServerLogoutSuccessHandler implements ServerLogoutSuccessHandler {

	@Override
	public Mono<Void> onLogoutSuccess(WebFilterExchange exchange, Authentication authentication) {
		return WriteResponse.write(exchange, WrapperedResult.ok("注销成功！"));
	}

}
